public class Likou_huiweng {
    class Solution {
        public boolean isPalindrome(int x) {
            if(x<0 || (x%10==0&&x!=0)){
                return false;
            }
            int Palindrome = 0;
            while(x>Palindrome){
                Palindrome=Palindrome*10+x%10;
                x=x/10;
            }
            return x==Palindrome || x==Palindrome/10;
        }
    }
}
